<div id="myCarousel" class="carousel slide">
      <!-- Indicators -->
      <ol class="carousel-indicators">
		<?php
			if(isset($list_slider)){
			$i=0;
			foreach($list_slider as $val){
			if($i==0){
				$kelas='class=active';
			}else{
				$kelas='';
			}
		?>
		
        <li data-target="#myCarousel" data-slide-to="<?php echo $i;?>" <?php echo $kelas;?>></li>
        
		<?php
		$i++;
		}
		}
		?>
      </ol>
      <div class="carousel-inner">
	  <?php
		if(isset($list_slider)){
		$i=0;
			foreach($list_slider as $val){
			if($i==0){
				$kelas='active';
			}else{
				$kelas='';
			}
			if($val['gambar']==""){
					$gambar="default.jpg";
				}else{
					$gambar=$val['gambar'];
				}
				$path_gambar=base_url()."foto_slider/".$gambar;
	  ?>
        
         <div class="item <?php echo $kelas;?>" style="background-image: url(<?php echo $path_gambar;?>)">
          <div class="container">
            <div class="carousel-caption">
              <h1><?php echo $val['judul']?></h1>
              <p> <?php
					$tmp_konten=strip_tags($val['konten']);
					$konten = word_limiter($tmp_konten, 20);
					echo $konten;
				?></p>
				<?php
				if($val['text_link']!=""){
				?>
              <p><a class="btn btn-primary" target="_blank" href="<?php echo $val['link']?>"><?php echo $val['text_link'];?></a></p>
			  <?php
				}
			  ?>
            </div>
          </div>
        </div>
		<?php
		$i++;
		}
		}
		?>
		
      </div>
      <a class="left carousel-control" href="#myCarousel" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
      <a class="right carousel-control" href="#myCarousel" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
    </div><!-- /.carousel -->